package com.itboye.sunsun.person.ui;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.itboye.sunsunhome.R;
import com.itboye.sunsunhome.R.id;
import com.itboye.sunsun.application.App;
import com.itboye.sunsun.controller.LoginController;
import com.itboye.sunsun.support.BaseActivity;

public class SttingActivity extends BaseActivity implements OnClickListener {

	private TextView versionname;

	private RelativeLayout mylocationrela,mylocationrelalanguage;

	@Override
	@SuppressLint("InlinedApi")
	protected void onCreate(Bundle arg0) {
		// TODO Auto-generated method stub
		super.onCreate(arg0);
		setContentView(R.layout.activity_sttings);

		try {
			PackageManager pm = App.ctx.getPackageManager();
			PackageInfo info = pm.getPackageInfo(App.ctx.getPackageName(), 0);
			String appVersion = info.versionName;
			versionname.setText(appVersion);
		} catch (Exception e) {

		}
		setStatusBarColor(R.color.home_blue);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {

		case R.id.protocalrela:
			 Intent intent4 = new Intent(SttingActivity.this,
			 ProtocalActivity.class);
			 startActivity(intent4);
			break;
		case R.id.mylocationrela:
			LoginController.onPersonalsettingClick(SttingActivity.this, null);
			break;
		case id.aboutrela:

			Intent intent3 = new Intent(SttingActivity.this,
					AboutActivity.class);
			startActivity(intent3);
			break;
		case R.id.mylocationrelalanguage:
			Intent intent=new Intent(SttingActivity.this,LanguageActivity.class);
			startActivity(intent);
			break;
	
		default:
			break;
		}
	}

}
